package com.xiaoshuidi.cloud.module.contract.controller.admin.contract.vo.ownerContract;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xiaoshuidi.cloud.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import java.time.LocalDate;

import static com.xiaoshuidi.cloud.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT;
import static com.xiaoshuidi.cloud.module.contract.util.date.DateUtils.FORMAT_DATE;

@Schema(description = "管理后台 - 业主合同分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ContractHouseOwnerHomePageReqVO extends PageParam {

    /**
     * 查询的开始时间
     */
    @Schema(description = "查询的开始时间")
    @NotEmpty(message = "未选中时间")
    @DateTimeFormat(pattern = FORMAT_DATE)
    @JsonFormat(pattern = FORMAT_DATE, timezone = TIME_ZONE_DEFAULT)
    private LocalDate startTime;

    /**
     * 查询的结束时间
     */
    @Schema(description = "查询的结束时间")
    @NotEmpty(message = "未选中时间")
    @DateTimeFormat(pattern = FORMAT_DATE)
    @JsonFormat(pattern = FORMAT_DATE, timezone = TIME_ZONE_DEFAULT)
    private LocalDate endTime;

}
